package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.AuthAdminContent;
import com.xmy.cultivate.entity.RenewClass;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.ResidueStudent;
import com.xmy.cultivate.entity.response.ContinueInfo;
import com.xmy.cultivate.entity.response.YearAndQuarter;
import com.xmy.cultivate.entity.views.*;
import org.apache.ibatis.annotations.Param;

import java.text.ParseException;
import java.util.List;

/**
 * <p>
 * 续班表 服务类
 * </p>
 *
 * @author min
 * @since 2022-08-23
 */
public interface IRenewClassService extends IService<RenewClass> {

    /**
     * @param schoolIdList
     * @param SubjectsId
     * @param YearPart
     * @param QuarterNum
     * @param TeacherName
     * @param StartDate
     * @param EndDate
     * @param type         1老师，2校区老师，3校长，4校区
     * @return
     */
    public abstract List<RenewClassRecord> getRenewRecord(String[] schoolIdList, String SubjectsId, Integer YearPart, Integer QuarterNum, String TeacherName, String StartDate, String EndDate, Integer type, List<Long> baseSchoolIdList);

    public abstract List<RenewClassRecord> getRenewRecordForTrack(String[] schoolIdList, String SubjectsId, Integer YearPart, Integer QuarterNum, String TeacherName, String StartDate, String EndDate, String trackId);

    List<RenewClassRecord> getPayFee(String schoolId, Integer yearPart, Integer quarterNum, String subjectsId, Integer type, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId, String classTypeId, Integer periodsNum, String name, AuthAdminContent authAdminContent, LeadDataRs leadDataRs, Integer versionNum, Integer paymentStaff, Integer paymentStaffType, Integer isDetails, String teacherId, Long adminId, Integer isCourseScheduling, String timeStart, String timeEnd) throws ParseException;

    List<RenewClassRecord> getPayFeeMarket(String schoolId, Integer yearPart, Integer quarterNum, String subjectsId, Integer type, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId, String classTypeId, Integer periodsNum, String marketTeacherId, Integer trackType, Integer classify, String teamId, AuthAdminContent authAdminContent, LeadDataRs leadDataRs) throws ParseException;

    List<RenewClassRecord> getPayFeeMarketForTeam(String schoolId, Integer yearPart, Integer quarterNum, String subjectsId, Integer type, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId, String classTypeId, Integer periodsNum, String marketTeacherId, Integer trackType, Integer classify, String teamId, AuthAdminContent authAdminContent, LeadDataRs leadDataRs) throws ParseException;

    IPage<StudentRatePay> getPayDetailList(IPage<StudentRatePay> iPage, Integer yearPart, Integer quarterNum, String schoolId, String teacherId, String gradeId, String subjectsId, Integer type, String startDate, String endDate, String trackId, String detailType, String lessonType, String yearClassId, String classTypeId, Integer periodsNum, Integer isNextDateNum, AuthAdminContent authAdminContent, LeadDataRs leadDataRs, Integer paymentStaff, Integer paymentStaffType, Integer versionNum, String paymentStaffId, Integer isCourseScheduling, String timeStart, String timeEnd);


    IPage<StudentRatePay> getPayDetailListMarket(IPage<StudentRatePay> iPage, Integer yearPart, Integer quarterNum, String schoolId, String teacherId, String gradeId, String subjectsId, Integer type, String startDate, String endDate, String trackId, String detailType, String lessonType, String yearClassId, String classTypeId, Integer periodsNum, String marketTeacherId, Integer trackType, Integer classify, String teamId, Integer isNextDateNum, AuthAdminContent authAdminContent, LeadDataRs leadDataRs);

    List<RenewClassRecordChart> payFeeChart(Long[] schoolId, List<YearAndQuarter> yearAndQuarterListBefore, List<YearAndQuarter> yearAndQuarterListAfter, Integer[] quarterNum, Integer[] subjectsId, Long[] teacherId, Integer[] yearClassId, Long[] classTypeId, String type, Integer lessonType, Integer periodsNum);

    List<ResidueStatics> residueStudentCount(String schoolId, String subjectsId, Integer type, Integer quarterNum, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId);

    public IPage<ResidueStudent> residueStudentCountDetail(IPage<?> iPage, String schoolId, String subjectsId, String yearPart, String quarterNum, String gradeId, String teacherId, String type, Integer status, Integer lessonType, String yearClassId);

    List<ContinueInfo> getContinueFee(Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, Integer type, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId, String classTypeId, String name, AuthAdminContent authAdminContent, LeadDataRs leadDataRs, Integer versionNum, Integer paymentStaff, Integer paymentStaffType, Integer isDetails, String teacherId) throws ParseException;

    IPage<ContinueInfo> getContinueFeeDetail(IPage<?> iPage, Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, Integer type, String startDate, String endDate, Integer lessonType, String teacherId, String gradeId, String yearClassId, String classTypeId, AuthAdminContent authAdminContent, LeadDataRs leadDataRs, Integer paymentStaff, Integer paymentStaffType, Integer versionNum, String paymentStaffId, Integer detailType) throws ParseException;

    List<RenewClassRecord> getDataSummary(DataSummaryList dataSummaryList);

    /**
     * 市场续报率
     */
    List<ContinueInfo> getContinueFeeMarket(Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, String startDate, String endDate, Integer lessonType, String yearClassId, String classTypeId, Integer classify, Integer trackType, String trackId) throws ParseException;

    /**
     * 市场续报率详情
     */
    IPage<ContinueInfo> getContinueFeeDetailMarket(IPage<?> iPage, Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, String startDate, String endDate, Integer lessonType, String teacherId, String gradeId, String yearClassId, String classTypeId, Integer classify, Integer trackType, String trackId) throws ParseException;

    /**
     * 市场续报率详情中的详情
     */
    IPage<ContinueInfo> getRenewRecordDetailMarketBySourseId(IPage<?> iPage, Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, String startDate, String endDate, Integer lessonType, String teamId, String gradeId, String yearClassId, String classTypeId, String sourseId, String detailType, Integer classify, Integer trackType, String trackId, AuthAdminContent authAdminContent, LeadDataRs leadDataRs) throws ParseException;

    List<ContinueInfo> getContinueFeeTeam(Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, Integer type, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId, String classTypeId, String teamId, Integer trackType, Integer classify, AuthAdminContent authAdminContent, LeadDataRs leadDataRs) throws ParseException;

    IPage<ContinueInfo> getContinueFeeDetailTeam(IPage<?> iPage, Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, Integer type, String startDate, String endDate, Integer lessonType, String teacherId, String gradeId, String yearClassId, String classTypeId, String teamId, Integer trackType, Integer classify) throws ParseException;

    List<ContinueInfo> getRenewRecordDetailTeamTeacher(Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, Integer type, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId, String classTypeId, String teamId, Integer trackType, Integer classify, AuthAdminContent authAdminContent, LeadDataRs leadDataRs) throws ParseException;

    //数据统计->续报率
    List<ContinueInfo> getDataSummaryRenewRecord(DataSummaryList dataSummaryList);

    List<RenewClassRecord> getPayFeeByTeacherIdList(String schoolId, Integer yearPart, Integer quarterNum, String subjectsId, Integer type, String startDate, String endDate, String trackId, Integer lessonType, String yearClassId, String classTypeId, Integer periodsNum, String name, String startGradeCount, String endGradeCount) throws ParseException;

    List<ContinueInfo> getContinueFeeByTeacherIdList(Integer yearPart, Integer quarterNum, String schoolId, String subjectsId, Integer type, String trackId, Integer lessonType, String yearClassId, String classTypeId, String name, String startGradeCount, String endGradeCount) throws ParseException;

}
